var qframe = {//小弹窗
    /**
     * @param text 显示的内容
     * @param buttony 第一个按钮
     * @param buttonn 第二个按钮
     */
    start:function(text,buttony,buttonn){
        this.frame = window.document.getElementById("qframe");
        this.textview = this.frame.getElementsByTagName("p")[0];
        this.textview.innerHTML = text;
        var bs = document.getElementsByTagName("button");
        bs[0].innerHTML = buttony;
        bs[1].innerHTML = buttonn;
        this.yes = function(){};
        this.no = function(){};
        this.frame.style.display ="block";
        },
    //两个函数对应两个按钮的触发
    yes:function(){},
    no:function(){},
    //生命周期结束
    hide:function(){this.frame.style.display ="none";}
    }
    document.body.innerHTML +=
    "<div id=\"qframe\"><div><p>text</p><button onclick=\"qframe.yes();qframe.hide();\">确定</button><button onclick=\"qframe.no();qframe.hide();\">取消</button></div>";
    //别忘了开始的时候设置yes or no